package com.baize.minespace.controller;

import com.baize.minespace.pojo.Mail;
import com.baize.minespace.utils.MailUtils;
import com.baize.minespace.utils.Result;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/sendMail")
public class SendMailController {
    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public Result<String> sendMail()
    {
        return Result.success("sadda");
    }
    @RequestMapping(value = "/send", method = RequestMethod.POST)
    public Result<String> sendMail(@RequestBody Mail mail) {
        return MailUtils.sendMail(mail);
    }
}
